package com.gw.vip.common.exception;

/**
 * @author GW
 * @description
 * @since 2022-03-30
 */
public enum  ExceptionEnums {
    /**
     * 2开头错误码，一般需要调用方特殊处理
     * 5开头错误码，一般系统内部错误
     * 6开头错误码，其他系统错误
     */
    SYSTEM_ERROR("500", "系统异常"),
    ERROR_PARAMS("10001", "无效参数"),
    NEED_AUTH_CODE("10002", "请获取验证码"),
    ERROR_AUTH_CODE("10003", "验证码错误"),
    NEED_AUTH("20001", "需要用户登陆"),
    INVALID_TOKEN("20002", "无效token"),
    ISSU_NOT_EXIST("20003", "发行机构不存在"),
    ERROR_SETTING("50001", "错误配置"),
    BUSINESS_FORBIDDEN("50002", "业务拒绝"),
    USER_EXIST("50003", "用户已经存在"),
    USER_NOT_EXIST("50004", "用户不存在"),
    ERROR_PASSWORD("50005", "密码错误"),
    ITEM_IS_EXIST("50006", "记录已经存在"),
    ITEM_NOT_EXIST("50007", "记录不存在"),
    LOW_AMT("50008", "余额不足"),
    OTHER_SYSTEM_ERROR("60001", "其他系统错误");

    private String key;
    private String value;

    ExceptionEnums(String key, String value){
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return this.key;
    }

    public String getValue(){
        return this.value;
    }
}
